﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.CompsitePattern.RoleReward
{
    /// <summary>
    /// 抽象的角色
    /// </summary>
    public abstract class AbstractRole
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 百分比
        /// </summary>
        public double Percent { get; set; }

        /// <summary>
        /// 计算分红
        /// </summary>
        /// <param name="totalMoney"></param>
        public abstract void CalculateDividend(double totalMoney);

        /// <summary>
        /// 添加子角色
        /// 透明模式
        /// </summary>
        /// <param name="roleChild"></param>
        public abstract void AddChild(AbstractRole roleChild);
    }
}
